package com.nengchuan.kbms.dfs.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nengchuan.kbms.common.DfsTreeNode;
import com.nengchuan.kbms.dfs.entity.po.UserFolder;
import com.nengchuan.tree.model.NcTreeNode;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 用户文件夹 Mapper 接口
 * </p>
 *
 * @author abe
 * @since 2020-03-30
 */
@Repository
public interface UserFolderMapper extends BaseMapper<UserFolder> {

    /**
     * 用户文件夹树
     * @param userId 用户id
     * @param rootId 节点id （用户文件夹id）
     * @return
     */
    List<DfsTreeNode> userFolderTree(@Param("user_id") Long userId, @Param("root_id") Long rootId);

}
